// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

// 配置axios(用于发送ajax请求)
import axios from 'axios'
Vue.prototype.$ajax = axios

//过滤器
import { isf, addPrefix, dis, blured, pei,pj,gy} from './utils/filters'
Vue.filter("isf", isf);
Vue.filter("addPrefix", addPrefix);
Vue.filter('dis', dis)
Vue.filter('blure', blured)
Vue.filter('pei', pei)
Vue.filter('pj', pj)
Vue.filter('gy', gy)
/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	template: '<App/>',
	components: { App }
})


// 为了让页码内容适应不同屏幕的手机。
var w = document.documentElement.clientWidth;
document.documentElement.style.fontSize = w / 32 + 'px';
// onresize: 调整属性的大小。知道屏幕里的块的宽度。
window.onresize = function () {
	var w = document.documentElement.clientWidth;
	document.documentElement.style.fontSize = w / 32 + 'px';
}
